package com.yc.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "PERSON")
public class Person implements java.io.Serializable {

	// Fields

	private String pid;
	private String pname;
	private String pwd;

	// Constructors

	/** default constructor */
	public Person() {
	}

	/** minimal constructor */
	public Person(String pid) {
		this.pid = pid;
	}

	/** full constructor */
	public Person(String pid, String pname, String pwd) {
		this.pid = pid;
		this.pname = pname;
		this.pwd = pwd;
	}

	// Property accessors
	@Id
	@Column(name = "PID", unique = true, nullable = false, length = 36)
	public String getPid() {
		return this.pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	@Column(name = "PNAME", length = 20)
	public String getPname() {
		return this.pname;
	}

	public void setPname(String pname) {
		this.pname = pname;
	}

	@Column(name = "PWD", length = 20)
	public String getPwd() {
		return this.pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	@Override
	public String toString() {
		return "Person [pid=" + pid + ", pname=" + pname + ", pwd=" + pwd + "]";
	}
	
	

}